{% extends "base.html" %}
{% import "_macros.html" as macros %}
{% import "_my_wtf_macros.html" as my_wtf_macros %}

{% block title %}万屏时代OPC--存量统计{% endblock %}

{% block panel_heading %}
  万屏时代OPC--存量统计
{% endblock %}

{% block panel_body %}
    <form id="search-form" action="{{ url_for('op_bp.stock_stat') }}" method="post" class="form" role="form">
        {{ my_wtf_macros.form_field(form.start_date, div_col=4, label_col=4, field_col=7) }}
        {{ my_wtf_macros.form_field(form.end_date, div_col=4, label_col=4, field_col=7) }}
        <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>
        <div class="pull-right btn-group">
            <button type="submit" class="btn btn-info">
                查询
            </button>
        </div>
    </form>

    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'op_bp.stock_stat', **url_kwargs) }}
    </div>
    {% endif %}

    <table id="sms-log-table" class="table table-bordered table-hover table-condensed table-striped table-responsive">
        <thead>
            <tr>
                <th>日期</th>
                <th>汇币充值</th>
                <th>汇币消耗</th>
                <th>汇币退返</th>
                <th>今日存量</th>
            </tr>
        </thead>
        <tbody>
            {% for each in data %}
            <tr>
                <td>{{ each.stat_date }}</td>
                <td>{{ each.incoming }}</td>
                <td>{{ each.cost_bid_point }}</td>
                <td>{{ each.ret_bid_point }}</td>
                <td>{{ each.stock_bid_point }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>


    {% if pagination %}
    <div class="pagination">
        {{ macros.pagination_widget(pagination, 'op_bp.stock_stat', **url_kwargs) }}
    </div>
    {% endif %}
{% endblock %}
